<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="include/base.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
  <head>
    
    <title>My JSP 'goal.jsp' starting page</title>
    
	<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
	<style type="text/css">
	
	</style>
  </head>
  
  <body class="body"> 
    	<%@ include file="include/top.jsp" %>
    	<div class="container" >
	  		<div class="row">
	  
	  			<!-- 导入左边文件 -->
	  			<div class="span3">
	  				
					<%@ include file="include/left.jsp" %>
				</div>
				<div class="span9">
		  			<div>
						<button class="btn btn-large btn-block" type="button"><a href="newgoal.jspx">添加新目标</a></button>
					</div>
					<c:forEach items="${requestScope.page.list }" var="goal" varStatus="vs">
						<ul class="breadcrumb" style="margin-bottom:0px;border-radius: 3px 3px 0 0;margin-top:15px">
							<li class="active">
								<a href="task.jspx?id=${goal.id}"><i class="icon-th"></i>${goal.name }</a>
							</li>
							<li style="float:right;"><i class="icon-edit"></i><a href="editgoal.jspx?id=${goal.id }" class="link-black">编辑</a></li>

						</ul>
						<div class="well">
							<p>${goal.desc }</p>
							<div class="progress progress-danger">
								<div class="bar" style="width: ${goal.rate}%;">已完成${goal.rate}%</div>
							</div>
						</div>
		           </c:forEach>
		           <c:if test="${empty page.list }">
		           		<p>
		           				<h2>还没有任何数据</h2>
		           		</p>
		           	
		          
		           </c:if>
			
				   <c:if test="${page.totalPages > 1 }">
		                <div class="pagination pull-right">
		                  <ul>
		                    <li ><a href="goal.jspx?p=1" >首页</a></li>
		                    <li><a href="goal.jspx?p=${(page.pageNum)-1 }" >上一页</a></li>
		                    <li><a href="goal.jspx?p=${(page.pageNum)+1}" >下一页</a></li>
		                    <li><a href="goal.jspx?p=${(page.totalPages)}" >尾页</a></li>
		                  </ul>
		                </div>
		          </c:if>
		         
				</div>
	  		 </div>
		</div>
		<script type="text/javascript" src="js/jquery.min.js"></script>
	
	
  </body>
</html>
